package week2;
import java.math.BigInteger;
import java.util.Scanner;

	public class Week2 {
		public static void main(String[] args)
		{
			StringBuilder builder=new StringBuilder();
			int n,begin,end;
			Scanner in=new Scanner(System.in);
			while(true)
			{   
				n=in.nextInt();
				for(int i=0;i<n;i++)
				{
					builder.append(i);
				}
				System.out.println(builder.toString());
				begin=in.nextInt();
				end=in.nextInt();
				System.out.println(builder.toString().substring(begin,end));
			}
			
		}
	}
